Weighting function for inclination and azimuth computation

ABSTRACT

A method, system, and computer readable medium is disclosed to estimate a survey parameter (e.g., attitude) for a drilling operation in a subterranean formation. The survey parameter is calculated using multiple methods with the results of the different methods weighted to improve the accuracy at a given attitude of the tool and angular velocity of the sensor package. Results from the different methods are combined based on a weighting function to generate the improved values of inclination and azimuth. Specifically, the values of the weighting function depend, linearly or non-linearly, on the attitude of the tool and quality of the survey data. In one scenario, the attitude of the tool is approximated by the most recently obtained static inclination/azimuth. In addition, the quality of the survey data is approximated by a measure of vibration severity that is represented by the number of good data points based on the roll rate.

BACKGROUND

Oil drilling is a general term for any boring through the Earth'ssurface that is designed to find and acquire underground assets such ashydrocarbons. A drillstring on a drilling rig is a column, or string, ofdrill pipe that transmits drilling fluid and torque to the drill bit.Downhole measurement of drillstring attitude is typically performed forthe purpose of steering and automation of drilling tools in directionaldrilling. The measurement is known as surveying and includes thecalculation of the inclination and azimuth of the drillstring withrespect to the earth's gravity and magnetic fields. The measurementperformed when the drillstring is stationary is referred to as a staticsurvey. The measurement performed when the drillstring is drilling isreferred to as a continuous survey.

In current technology, the attitude (i.e., the inclination and azimuth,referred to as survey parameter) is computed using 3-axis accelerometerand 3-axis magnetometer sensor measurements (collectively referred to assurvey data). Raw data of these measurements along threemutually-orthogonal axes is referred to as 3-axis data. Normalizedprojection of the 3-axis data on the axial axis is referred to asnormalized axial data. Normalized projection is computed by dividing theaxial component of the accelerometer/magnetometer data by the totalgravity/magnetic field. The “axial” axis is the drilling axis of adownhole tool and generally referred to as z-axis, as is known to thoseskilled in the art. The calculation may be performed using 3-axis data(referred to as 3-axis measurement method known in the art) or usingnormalized axial data (referred to as axial vectors method known in theart). The axial vectors method using the normalized axial data ispreferred during drilling when the magnitude of the angular velocity ofthe drillstring is high. In particular, this avoids using the lateralaxis accelerometer data, which can be corrupted by centripetal andtangential components during drilling. However, when the axis of thedrillstring at the sensors is substantially parallel (e.g., within +/−10deg) to the earth's gravity and magnetic fields, sensor noise can leadto large errors in the calculations. In other words, the 3-axismeasurement method using 3-axis data becomes less accurate duringdrilling due to shock/vibration induced noise sensitivity of thesensors. The axial vectors method becomes less accurate when the tool isdrilling near vertical or drilling in the north-south plane due togravity/magnetic field induced noise sensitivity of the sensors.Specifically, the axial vectors method using axial data to calculateinclination becomes less accurate when the tool is drilling nearvertical. Similarly, the axial vectors method using axial data tocalculate azimuth becomes less accurate either when the tool is drillingin the north-south plane.

SUMMARY

In general, one or more aspects of the present disclosure include amethod, system, and computer readable medium to estimate a surveyparameter (e.g., attitude) for drilling operations in subterraneanformations. These aspects include calculating multiple estimates usingdifferent methods and automatically weighting the contributions from thedifferent methods to improve the accuracy of the survey parameter. Inthe case of attitude, the results from the different methods arecombined based on a weighting function to generate the improved valuesof inclination and azimuth. Specifically, the value(s) of the weightingfunction depend(s), linearly or non-linearly, on the attitude of thetool and quality of the survey data. In one or more aspects of thepresent disclosure, the attitude of the tool is approximated by the mostrecently obtained static inclination/azimuth. In addition, the qualityof the survey data is approximated by a measure of vibration severitythat is represented by the number of good data points based on the rollrate.

In one or more aspects of the present disclosure, values of theweighting function are used as coefficients in a weighted averageformula to combine calculation results from different methods. Theweighting function may be used as a membership function of a fuzzy logicmodel to combine calculation results from multiple different methods.The weighting function may be determined by comparing known attitudes ofa stationary drillstring to calculation results from multiple differentmethods while injecting shock/vibration to emulate the drillingcondition. The weighting function may be determined by simulating thecalculation results from multiple different methods based on noise modelof the drillstring/BHA electronics and a noise sensitivity model of thesensors.

Other aspects will be apparent from the following detailed descriptionand the appended claims.

BRIEF DESCRIPTION OF DRAWINGS

The appended drawings illustrate several embodiments of weightingfunction for inclination and azimuth computation and are not to beconsidered limiting of its scope, for weighting function for inclinationand azimuth computation may admit to other equally effectiveembodiments.

FIG. 1.1 is a schematic view of a wellsite depicting a drillingoperation in which one or more embodiments of weighting function forinclination and azimuth computation may be implemented.

FIG. 1.2 shows a system using weighting function for inclination andazimuth computation in accordance with one or more embodiments.

FIGS. 1.3-1.6 depict examples of weighting function for inclination andazimuth computation in accordance with one or more embodiments.

FIG. 2 depicts an example flowchart using weighting function forinclination and azimuth computation in accordance with one or moreembodiments.

FIG. 3 depicts an example of using weighting function for inclinationand azimuth computation in accordance with one or more embodiments.

FIG. 4 depicts a computer system using which one or more embodiments ofweighting function for inclination and azimuth computation may beimplemented.

DETAILED DESCRIPTION

Aspects of the present disclosure are shown in the above-identifieddrawings and described below. In the description, like or identicalreference numerals are used to identify common or similar elements. Thedrawings are not necessarily to scale and certain features may be shownexaggerated in scale or in schematic in the interest of clarity andconciseness.

FIG. 1.1 is a schematic view of a wellsite (100) depicting a drillingoperation. The wellsite (100) includes a drilling system (311) and asurface unit (334). In the illustrated embodiment, a borehole (313) isformed by rotary drilling in a manner that is well known. Those ofordinary skill in the art given the benefit of this disclosure willappreciate, however, that weighting function for inclination and azimuthcomputation as disclosed herein may also be used in drillingapplications other than conventional rotary drilling (e.g., mud-motorbased directional drilling), and is not limited to land-based rigs.

The drilling system (311) includes a drill string (315) suspended withinthe borehole (313) with a drill bit (310) at its lower end. The drillingsystem (311) also includes the land-based platform and derrick assembly(312) positioned over the borehole (313) penetrating a subterraneanformation (F). The assembly (312) includes a rotary table (314), kelly(316), hook (318) and rotary swivel (319). The drill string (315) isrotated by the rotary table (314), energized by means not shown, whichengages the kelly (316) at the upper end of the drill string. The drillstring (315) is suspended from hook (318), attached to a traveling block(also not shown), through the kelly (316) and a rotary swivel (319)which permits rotation of the drill string relative to the hook.

The drilling system (311) further includes drilling fluid or mud (320)stored in a pit (322) formed at the well site. A pump (324) delivers thedrilling fluid (320) to the interior of the drill string (315) via aport in the swivel (319), inducing the drilling fluid to flow downwardlythrough the drill string (315) as indicated by the directional arrow.The drilling fluid (320) exits the drill string (315) via ports in thedrill bit (310), and then circulates upwardly through the region betweenthe outside of the drill string (315) and the wall of the borehole(313), called the annulus (326). In this manner, the drilling fluid(320) lubricates the drill bit (310) and carries formation cuttings upto the surface as it is returned to the pit (322) for recirculation.

The drill string (315) further includes a bottom hole assembly (BHA)(330), near the drill bit (310). In other words, the BHA may be locatedwithin several drill collar lengths from the drill bit. The BHA (330)includes capabilities for measuring, processing, and storinginformation, as well as communicating with the surface unit (334). TheBHA (330) further includes drill collars (328) for performing variousother measurement functions. In one or more embodiments, the BHA (330)includes the attitude calculator (200). In one or more embodiments, aportion of the attitude calculator (200), or any component containedtherein, may also be included in the surface unit (334).

Sensors (S) are located about the wellsite to collect data, which may bein real time, concerning the operation of the wellsite, as well asconditions at the wellsite. The sensors (S) may also have features orcapabilities, of monitors, such as cameras (not shown), to providepictures of the operation. Surface sensors or gauges (S) may be deployedabout the surface systems to provide information about the surface unit,such as standpipe pressure, hook load, depth, surface torque, rotaryrotations per minute (rpm), among others. Downhole sensors or gauges (S)are disposed about the drilling tool and/or wellbore to provideinformation about downhole conditions, such as wellbore pressure, weighton bit, torque on bit, direction, inclination, collar rpm, tooltemperature, annular temperature and toolface (i.e., angle of a tool),among others. Multiple downhole sensors (S) may be located at differentpositions on BHA (330), such as sensor (201) and sensor (202). In one ormore embodiments, sensor (201) and sensor (202) may include one or more3-axis magnetometers and 3-axis accelerometers. In one or moreembodiments, a 3-axis magnetometer is a device for measuring theintensity of magnetic fields along three mutually-orthogonal axes. Inone or more embodiments, a 3-axis accelerometer is a device formeasuring accelerations along three mutually-orthogonal axes. Theinformation collected by the sensors is conveyed to the various parts ofthe drilling system and/or the surface unit (334).

The BHA (330) and/or surface unit (334) may include all or a portion ofan attitude calculator (shown in FIG. 1.2). For example, the attitudecalculator (200) may be located on the BHA (330), on the surface unit(334), or a portion may be located on the BHA (330) and another portionmay be located on the surface unit (334). Alternatively, all or aportion of the attitude calculator (200) may be located in a remotelocation from the oilfield. The attitude calculator (200) includesfunctionality to calculate the inclination and azimuth of thedrillstring using multiple methods. Further, in one or more embodiments,the attitude calculator (200) may include functionality to adjustphysical components of the BHA (330) in response to calculating theinclination and azimuth. The attitude calculator (200) is discussed infurther detail below with respect to FIG. 1.2.

Continuing with FIG. 1.1, the drilling system (311) is operativelyconnected to the surface unit (334) for communication therewith. The BHA(330) is provided with a communication subassembly (352) thatcommunicates with the surface unit (334). The communication subassembly(352) is adapted to send signals to and receive signals from the surfaceusing mud pulse telemetry. The communication subassembly (352) mayinclude, for example, a transmitter that generates a signal, such as anacoustic or electromagnetic signal, which is representative of themeasured drilling parameters. It will be appreciated by one of skill inthe art that a variety of telemetry systems may be employed, such as mudpulse telemetry, wired drill pipe, electromagnetic or other knowntelemetry systems.

Typically, the wellbore is drilled according to a drilling plan that isestablished prior to drilling. The drilling plan typically sets forthequipment, pressures, trajectories and/or other parameters that definethe drilling process for the wellsite. The drilling operation may thenbe performed according to the drilling plan. However, as information isgathered, the drilling operation may deviate from the drilling plan.Additionally, as drilling or other operations are performed, thesubsurface conditions may change. The earth model may also be adjustedas new information is collected. Such information may include resultsgenerated by the attitude calculator (200) that are used to identifycorrective actions to address a drilling event. For example, thedrilling plan may be adjusted based on the calculated inclination andazimuth.

The subterranean assets are not limited to hydrocarbons such as oil,throughout this document, the terms “oilfield” and “oilfield operation”may be used interchangeably with the terms “field” and “field operation”to refer to a site where any type of valuable fluids can be found andthe activities for extracting them. The terms may also refer to siteswhere substances are deposited or stored by injecting them into thesurface using boreholes and the operations associated with this process.Further, the term “field operation” refers to a field operationassociated with a field, including activities related to field planning,wellbore drilling, wellbore completion, and/or production using thewellbore.

FIG. 1.2 shows more details of the attitude calculator (200) depicted inFIG. 1.1. As shown in FIG. 1.2, the attitude calculator (200) includes aweighting function generator (203), a data analyzer (204), and a datarepository (210) storing various data used or generated by the weightingfunction generator (203) and the data analyzer (204). For example, theweighting function (211) is generated by the weighting functiongenerator (203). The output results of the weighting function (211) arereferred to as weighting coefficients or weights. The 3-axisaccelerometer data (212) and the 3-axis magnetometer data (213) are usedby the data analyzer (204) to generate the calculated inclination (214)and the calculated azimuth (216). In one or more embodiments, one ormore of the modules and elements shown in FIG. 1.2 may be omitted,repeated, and/or substituted. Accordingly, embodiments of weightingfunction for inclination and azimuth computation should not beconsidered limited to the specific arrangements of modules shown in FIG.1.2.

In one or more embodiments, the data repository (210) is any type ofstorage unit and/or device (e.g., a file system, database, collection oftables, or any other storage mechanism) for storing data. Further, thedata repository (210) may include multiple different storage unitsand/or devices. The multiple different storage units and/or devices mayor may not be of the same type or located at the same physical site. Forexample, a portion of the data repository (210) may be located on theBHA (330) while another portion may be located at the surface unit(334).

In one or more embodiments, the attitude calculator (200) corresponds tohardware, software, or a combination thereof. In one or moreembodiments, the attitude calculator (200) is configured to determineinclination (i.e., calculated inclination (214)) and azimuth (i.e.,calculated azimuth (216)) based on 3-axis accelerometer data (212)received from the 3-axis accelerometer (201), and 3-axis magnetometerdata (213) received from the 3-axis magnetometer (202). In particular,the 3-axis accelerometer data (212) and the 3-axis magnetometer data(213) are referred to as survey data and represent accelerationinformation and magnetic fields, respectively, in three directions. Inone or more embodiments, the 3-axis accelerometer (201) and/or the3-axis magnetometer (202) may be located on a rotary steerable platform(e.g., rotating with the drill bit up to 250 rotations-per-minute (rpm)during drilling), roll-stabilized platform (e.g., rotating at less than5 rpm), a non-rotating platform, a slowly-rotating housing (e.g.,rotating at less than 20 rotations-per-hour (rph)), or a slowly-rotatingsleeve housing with a controlled rotation speed (e.g., rotating at lessthan 20 rotations-per-hour (rph)). Examples of these platforms/housingsare disclosed in U.S. Pat. Nos. 5,265,682, 5,353,884, 6,427,783, and/or7,950,473.

In one or more embodiments, the survey data includes 3-axisaccelerometer data (e.g., the 3-axis accelerometer data (212)) and3-axis magnetometer data (e.g., the 3-axis magnetometer data (213)) thatare captured during a survey time window (e.g., 60 seconds, 3 minutes,etc.). Throughout this disclosure, (G_(x), G_(y), G_(z)) and (B_(x),B_(y), B_(z)) denote the 3-axis accelerometer and 3-axis magnetometermeasurements, respectively. Each component (e.g., G_(x)) of the surveydata has m data points, where m is the number of measurements capturedduring the survey time window. The subscripts denote the sensor axis.The z-axis is aligned with the drillstring axis, the x- and y-axes areperpendicular to the drillstring axis.

The roll rate (i.e., rotation rate, such as measured in rpm) of thesensor (e.g., 3-axis accelerometer (201), 3-axis magnetometer (202)) isalso measured during the survey using either a roll gyro (not shown) orusing the differential of the magnetic roll angle calculated using thecross-axial/transverse 3-axis magnetometer measurements in near-verticalcases. R denotes the roll rate measurements in the survey.

Sensor measurements are less accurate during drilling due to therotation of the drillstring that induces shock/vibration. Theenvironmental variables are variables which do not change significantlyduring drilling, such as the magnitude of the gravity and magneticvectors, and the magnetic dip angle. These environmental variables canbe more accurately determined when drilling is stopped, e.g., when a newdrillstring is added. Environmental variables determined when thedrilling is stopped (i.e., during the static survey) are then used forcalculations performed during drilling. In one or more embodiments, thedata analyzer (204) is configured to determine environmental variablesdefined by equations 1.2a, 1.2b, and 1.2c below.

$\begin{matrix}{{{sG}_{tot} = {\mu\{ \sqrt{G_{x}^{2} + G_{y}^{2} + G_{z}^{2}} \}}},} & ( {1.2.a} ) \\{{{sB}_{tot} = {\mu\{ \sqrt{B_{x}^{2} + B_{y}^{2} + B_{z}^{2}} \}}},} & ( {1.2.b} ) \\{{{s\mspace{11mu}\sin\mspace{14mu}{Dip}} = \frac{\mu\{ {{G_{x}B_{x}} + {G_{y}B_{y}} + {G_{z}B_{z}}} \}}{{sG}_{tot}{sB}_{tot}}},} & ( {1.2.c} )\end{matrix}$

where s denotes the static survey and μ{ } denotes the mean value of therecorded data over a large number of data samples. For example, the meanvalue of G_(x) is expressed as:

${\mu\{ G_{x} \}} \equiv {\frac{1}{n}{\sum\limits_{i = 1}^{n}\;{G_{x}\lbrack i\rbrack}}} \equiv {\frac{{G_{x}\lbrack 1\rbrack} + {G_{x}\lbrack 2\rbrack} + \ldots + {G_{x}\lbrack {n - 1} \rbrack} + {G_{x}\lbrack n\rbrack}}{n}.}$Further, sG_(tot) is the magnitude of the gravity vector, sB_(tot) isthe magnitude of the magnetic vector, and s sin Dip is the sine of themagnetic dip angle. In the static survey, there may still be rotation ofthe sensor platform (and therefore the sensors mounted thereon) in somesituations. For example, during normal condition in the static survey,the roll-stabilized platform may be stationary in a non-rotating phaseor rotate at less than 5 rpm in a rotating phase, a slowly-rotatinghousing or a slowly-rotating sleeve housing may rotate at less than 20rph. From time to time, the roll rate may exhibit abnormally highmagnitude due to abnormal conditions, such as a sudden mud flow ratechange or the stick-slip condition of the BHA/drill bit. In one or moreembodiments, the sensor data obtained during these abnormal conditionsare discarded. Specifically, the environmental variables involvingaccelerometer measurements, determined using equations 1.2a, and 1.2c,are based on sensor data obtained when the roll rate is less than athreshold value: |R|<R max. For example, R_(max) may be set at 5 rpm forthe roll-stabilized platform, 20 rph for the slowly-rotating housing ora slowly-rotating sleeve housing. Because the rotary steerable platformand non-rotating platform are normally stationary during static survey,R_(max) may be also set at 5 rpm.

In one or more embodiments, the data analyzer (204) is configured tocalculate the inclination angle using axial vectors method and/or 3-axismeasurements method based on the environmental variables determinedduring the static survey. These methods may be used during the staticsurvey when the drilling is stopped or during continuous survey when thedrill bit is drilling.

Using the axial vectors method, the inclination is given by thetrigonometric function “arcos” of the normalized projection of thegravitational field on the axial axis:

$\begin{matrix}{{{Inc}_{1} = {\arccos\;( G_{zn} )}},{where}} & ( {1.3{{.1}.a}} ) \\{{G_{zn} = \frac{\mu\{ G_{z} \}}{{sG}_{tot}}},} & ( {1.3{{.1}.b}} )\end{matrix}$

is the average axial accelerometer measurement normalized by thedenominator sG_(tot) (i.e., the average magnitude of the accelerometermeasurement calculated during the static survey.)

Using the 3-axis measurements method, the inclination is given by thetrigonometric function “arcsin” of the normalized magnitude of theprojection of the gravitational field on the lateral axes:

$\begin{matrix}{{{Inc}_{2} = {\arcsin\;( G_{xyn} )}},{where}} & ( {1.3{{.2}.a}} ) \\{{G_{xyn} = \frac{\mu\{ \sqrt{G_{x}^{2} + G_{y}^{2}} \}}{{sG}_{tot}}},} & ( {1.3{{.2}.b}} )\end{matrix}$

is the average lateral accelerometer measurement, also normalized by thedenominator sG_(tot).

In one or more embodiments, the data analyzer (204) is configured to usethe weighting function (211) to determine the calculated inclination(214) from

Inc₁ and Inc₂, such that the 3-axis method is used only when theinclination is low (e.g., less than 10 deg) and when the survey dataquality is high. The survey data quality is statistically determinedbased on how frequent the abnormal conditions occur when the roll rateexceeds R_(max). Similar to determining the environmental variables,sensor data obtained during the abnormal conditions are discarded whencalculating the inclination using equations 1.3.1.a through 1.3.2.b. Anexample formula for determining the calculated inclination (214) isgiven as:Inc=Inc₁·(1−swInc·wN)+Inc₂ ·swInc·wN,  (1.5.1.a)

In equation (1.5.1.a), swInc is the weighting function on theinclination. It is based on the inclination sInc₁ that is calculatedfrom the axial vector method during the static survey. In one or moreembodiments, the inclination sInc₁ is determined using the equation(1.3.1a) with the condition that |R|<R max as this result is less proneto sensor noise.

An example weighting function on the inclination is given by:

$\begin{matrix}{{{sw}\;{Inc}} = \{ {\begin{matrix}1 & {for} & {0 \leq {sInc}_{1} \leq {{Inc}\;\min}} \\\frac{{{Inc}\mspace{14mu}\max} - {sInc}_{1}}{{{Inc}\mspace{14mu}\max} - {{Inc}\mspace{14mu}\min}} & {for} & {{{Inc}\mspace{11mu}\min} < {sInc}_{1} < {{Inc}\;\max}} \\0 & {for} & {{sInc}_{1} \geq {{Inc}\mspace{11mu}\max}}\end{matrix},} } & ( {1.5{{.1}.b}} )\end{matrix}$

In this equation, sInc₁ is used as a constant in-between consecutivestatic surveys with the assumption that the inclination does not changesignificantly between consecutive static surveys. For example, staticsurveys may be performed periodically (e.g., every 33 m of drillingdepth, or every 1 deg change in the computed inclination) to hold thisassumption true.

In an example of low inclination drilling trajectory, Inc_(max) is setat a low angle, such as 10 deg. In general, the values of Inc_(min) andInc_(max) are chosen to give the lowest error on the inclination andazimuth measurements with respect to real-life noise inducing mechanismsdownhole. The optimum values may be determined empirically by trial anderror or using computer based optimization technique. In one or moreembodiments, the weighting function generator (203) is configured todetermine the values of Inc_(min) and Inc_(max) using simulated data fora specified level of error sources such as shock and vibration, sensormisalignment, sensor pack roll stabilization error, magneticinterference etc. In one or more embodiments, the weighting functiongenerator (203) is configured to determine the values of Inc_(min) andInc_(max) using a calibration technique to compare ground truth data andthe raw data recorded by the 3-axis accelerometer and 3-axismagnetometer when drilling downhole.

Also in equation (1.5.1.a), wN is the weighting function on the numberof valid data samples N during the survey timing window (e.g., 60seconds, 3 minutes, etc.) where the roll rate is less than a thresholdvalue, N: |R|<R max.

An example weighting function on the number of valid data samples isgiven by:

$\begin{matrix}{{wN} = \{ {\begin{matrix}0 & {for} & {N \leq {N\mspace{14mu}\min}} \\\frac{N - {N\mspace{11mu}\min}}{{N\mspace{11mu}\max} - {N\mspace{11mu}\min}} & {for} & {{N\mspace{11mu}\min} < N < {N\mspace{11mu}\max}} \\1 & {for} & {N \geq {N\mspace{11mu}\max}}\end{matrix},} } & ( {1.5{{.1}.c}} )\end{matrix}$

In particular, the values of N_(min) and N_(max), are chosen to give thelowest error on the inclination and azimuth measurement with respect toreal-life occurrences of abnormal conditions downhole. The optimumvalues may be determined empirically by trial and error or computerbased optimization technique. In one or more embodiments, the weightingfunction generator (203) is configured to determine the values ofN_(min) and N_(max), using simulated data for a specified level of errorsources such as shock and vibration, sensor misalignment, sensor packroll stabilization error, magnetic interference, etc. In one or moreembodiments, the weighting function generator (203) is configured todetermine the values of N_(min) and N_(max) using a calibrationtechnique to compare ground truth data and the raw data recorded by the3-axis accelerometer and 3-axis magnetometer when drilling downhole.

FIGS. 1.3 and 1.4 show the example weighting function swInc on theinclination according to the equation (1.5.1.b) and the exampleweighting function wN on the number of valid samples according to theequation (1.5.1.c), respectively. It can be seen that swInc=1 for lowinclination cases (near vertical). In addition, wN=1 for cases with fewoccurrences of abnormal condition, such as when the drillstring isstationary with minimum vibration and shock. In an example scenario,static surveys are performed periodically (e.g., every 33 m of drillingadvancement) while continuous surveys are performed in-betweenconsecutive static surveys. The output values of the weighting functionin each continuous survey are looked up using swInc calculated in themost recent static survey and wN calculated during the currentcontinuous survey.

In one or more embodiments, the data analyzer (204) is configured toestimate the azimuth angle using the axial vectors method and/or the3-axis measurements method based on the environmental variablesdetermined during the static survey. These methods may be used duringstatic survey when the drilling is stopped or during continuous surveywhen the drill bit is drilling.

Using the axial vectors method, the azimuth is given by:Azi₁=arctan 2(SAzi·√{square root over (|arg Azi|)},B _(zn) −G _(zn) ·ssin Dip),  (1.4.1.a)

wherearg Azi=1−G _(zn) ² −B _(zn) ² −s sin Dip²+2s sin Dip·G _(zn) B_(zn),  (1.4.1.b)

is the argument of the square root,

$\begin{matrix}{{B_{zn} = \frac{\mu\{ B_{z} \}}{{sB}_{tot}}},} & ( {1.4{{.1}.c}} )\end{matrix}$

is the average axial 3-axis magnetometer measurement normalized by thedenominator sBtot (i.e., the average magnitude 3-axis magnetometermeasurement,) andSAzi=sign(μ{G _(x) B _(y) −G _(y) B _(x)}),  (1.4.1.d)

is the sign of the azimuth.

Using the 3-axis measurements method, the azimuth is given by:Azi₂=arctan 2(sG _(tot) μ{G _(x) B _(y) −G _(y) B _(x) },G _(xy) ² μ{B_(z) }−μ{G _(z) }μ{G _(x) B _(x) +G _(y) B _(y)}),  (1.4.2.a)whereG _(xy) ²=μ(G _(x) ² +G _(y) ²),  (1.4.2.b)

is the average squared magnitude of the lateral accelerometermeasurements.

In one or more embodiments, the data analyzer (204) is configured to usethe weighting function (211) to determined the calculated azimuth (216)from Azi₁ and Azi₂ such that the 3-axis method is used only when eitherthe inclination is low or azimuth is north-south, and when the surveydata quality is high. As noted above, the survey data quality isstatistically determined based on how frequent the abnormal conditionsoccur when the roll rate exceeds R_(max). Similar to determining theenvironmental variables and calculating the inclination, sensor dataobtained during the abnormal conditions are discarded when calculatingthe azimuth using equations 1.4.1.a-1.4.2.b. An example estimation ofthe calculated azimuth (216) is given as:Azi=Azi₁·[1−max(swInc,swAzi)·wN]+Azi₂·max(swInc,swAzi)·wN,  (1.5.2.a)

where max indicates the maximum of the input arguments. In equation(1.5.2.a), swAzi is the weighting function on the azimuth. It is basedon the azimuth sAzi₁ that is calculated from the axial vector methodduring the static survey, as this value is less prone to sensor noise.An example is given by:

$\begin{matrix}{{swAzi} = \{ \begin{matrix}1 & {for} & {{{{{0 \leq {{sAzi}_{1}} \leq {{Azi}\mspace{11mu}\min}}\mspace{14mu}\&}\mspace{14mu} 180} - {{Azi}\mspace{11mu}\min}} \leq {{sAzi}_{1}} \leq 180} \\\frac{{{Azi}\mspace{11mu}\max} - {{sAzi}_{1}}}{{{Azi}\mspace{11mu}\max} - {{Azi}\mspace{11mu}\min}} & {for} & {{{Azi}\mspace{11mu}\min} < {{sAzi}_{1}} < {{Azi}\mspace{11mu}\max}} \\\frac{{{sAzi}_{1}} + {{Azi}\mspace{11mu}\max} - 180}{{{Azi}\mspace{11mu}\max} - {{Azi}\mspace{11mu}\min}} & {for} & {{180 - {{Azi}\mspace{11mu}\max}}\mspace{11mu} < {{sAzi}_{1}} < {180 - {{Azi}\mspace{11mu}\min}}} \\0 & {for} & {{{Azi}\mspace{11mu}\max}\; \leq {{sAzi}_{1}} \leq {180 - {{Azi}\mspace{11mu}\max}}}\end{matrix} } & ( {1.5{{.2}.b}} )\end{matrix}$

In this equation, sAzi₁ is used as a constant in-between consecutivestatic surveys with the assumption that the azimuth does not changesignificantly between consecutive static surveys. For example, staticsurveys may be performed periodically (e.g., every 33 m of drillingdepth, or every 1 deg change in the computed azimuth) to hold thisassumption true.

FIG. 1.5 shows an example weighting function on the azimuth according tothe equation (1.5.2.b). In an example scenario, static surveys areperformed periodically (e.g., every 33 m of drilling advancement) whilecontinuous surveys are performed in-between consecutive static surveys.The output values of the weighting function in each continuous surveyare looked up using swInc and swAzi calculated in the most recent staticsurvey and wN calculated during the current continuous survey.

In the example embodiments described above, the weighting functions areused to optimize contributions between 2 measurement methods. In otherembodiments, a weighting function can be used among 3, 4, or moreattitude determining methods.

A 3-weighting function example is shown as below:Inc=Inc₁ ·w1+Inc₂ ·w2+Inc₃ ·w3,  (4.3.a)wherew1+w2+w3=1,  (4.3.b)

and w1, w2 and w3 are functions of the static inclination sInc₁.

A 4-weighting function example is shown as below:Inc=Inc₁ ·w1+Inc₂ ·w2+Inc₃ ·w3+Inc₄ ·w4,  (4.3.c)wherew1+w2+w3+w4=1,  (4.3.d)

and w1, w2, w3 and w4 are functions of the static inclination sInc₁.

In another example for calculating inclination, there are six differentequations that can be used. As described above, weighting functions canbe written with any 2, 3, 4, 5 or 6 combinations of these equations(e.g., 57 possibilities). Inc₁, is the axial method and Inc₂ is the3-axis lateral method described in equations 1.3.1.a and 1.3.2.a. Inc₃,Inc₄, Inc₅, Inc₆ are given by:

$\begin{matrix}{{{Inc}_{3} = {\arctan\; 2( {G_{xy}\text{/}G_{zz}} )}},} & ( {4.3.e} ) \\{{{Inc}_{4} = {\arccos( G_{{zn}^{\prime}} )}},} & ( {4.3.f} ) \\{{{Inc}_{5} = {\arcsin\;( G_{{xyn}^{\prime}} )}},} & ( {4.3.g} ) \\{{{Inc}_{6} = {\arctan\; 2( {G_{{xyn}^{\prime}}\text{/}G_{{zn}^{\prime}}} )}},{where}} & ( {4.3.h} ) \\{{G_{xy} = {\mu\{ \sqrt{G_{x}^{2} + G_{y}^{2}} \}}},} & ( {4.3.i} ) \\{{G_{zz} = {\mu\{ G_{z} \}}},} & ( {4.3.j} ) \\{{G_{{zn}^{\prime}} = \frac{{sG}_{tot} - G_{xy}}{{sG}_{tot}}},{and}} & ( {4.3.k} ) \\{G_{{xyn}^{\prime}} = {\frac{{sG}_{tot} - G_{zz}}{{sG}_{tot}}.}} & ( {4.3.l} )\end{matrix}$

In yet another example for calculating azimuth, in addition to (1.4.1a)and (1.4.2a), three more methods can be used as below:

$\begin{matrix}{{{Azi}_{3} = {\arctan\; 2( \sqrt{\frac{{{\cos^{2}(\lambda)}{\sin^{2}(\theta)}} - \lbrack {{\cos\;(\theta)\sin\;(\lambda)} - {\cos\;( {Inc}_{1} )}} \rbrack^{2}}{{{\cos^{2}(\lambda)}\lbrack {{\sin^{2}( {Inc}_{1} )} - {\sin^{2}(\theta)}} \rbrack} + \lbrack {{{\cos(\theta)}{\sin(\lambda)}} - {\cos( {Inc}_{1} )}} \rbrack^{2}}} )}},} & ( {4.1.a} ) \\{\mspace{79mu}{{{Azi}_{4} = {\arccos( \frac{{{sG}_{tot}B_{zz}} - {{sB}_{tot}G_{zz}\sin\mspace{11mu}\lambda}}{{sB}_{tot}\cos\;( \sqrt{{sG}_{tot}^{2} - G_{zz}^{2}} )} )}},}} & ( {4.1.b} ) \\{\mspace{79mu}{{{Azi}_{5} = {\arccos\;( \frac{{\cos\;(\theta)} - {\cos\;( {Inc}_{1} )\;\sin\;(\lambda)}}{\sin\;( {Inc}_{1} )\cos\;(\lambda)} )}},\mspace{79mu}{where}}} & ( {4.1.c} ) \\{\mspace{79mu}{{B_{zz} = {\mu\{ B_{z} \}}},}} & ( {4.1.d} ) \\{\mspace{79mu}{{\lambda = {\arcsin\;( {s\mspace{11mu}\sin\mspace{11mu}{Dip}} )}},\mspace{79mu}{{\cos\;(\theta)} = {B_{zz}\text{/}{sB}_{tot}}}}} & ( {4.1.e} )\end{matrix}$

and where Inc₁ is defined in equation 1.3.1.a above.

The use of weighting function is not limited to inclination and azimuthcomputation. In one or more embodiments, the use of weighting functionis applied to other survey parameters, such as magnetic dip anglecomputation. As is known in the art, the magnetic dip angle is the anglebetween the earth's magnetic field vector and the horizontal direction.

For example:

$\begin{matrix}{\mspace{79mu}{{{Dip}_{1} = {\arcsin\;( {\sin\mspace{11mu}{Dip}} )}},}} & ( {4.5.a} ) \\{\mspace{79mu}{{{\sin\mspace{11mu}{Dip}} = {\frac{1}{{sG}_{tot}{sB}_{tot}}\mu\{ ( {{G_{x}B_{x}} + {G_{y}B_{y}} + {G_{z}B_{z}}} ) \}}},}} & ( {4.5.b} ) \\{\mspace{79mu}{{{Dip}_{2} = {\arccos\;( {\cos\mspace{11mu}{Dip}} )}},}} & ( {4.5.c} ) \\{{{\cos\mspace{11mu}{Dip}} = {\frac{1}{{sG}_{tot}{sB}_{tot}}\mu\{ \sqrt{( {{G_{y}B_{z}} - {G_{z}B_{y}}} )^{2} + ( {{G_{z}B_{x}} - {G_{x}B_{z}}} )^{2} + ( {{G_{x}B_{y}} - {G_{y}B_{x}}} )^{2}} \}}},} & ( {4.5.d} ) \\{\mspace{79mu}{{{Dip} = {{{Dip}_{1} \cdot ( {1 - w} )} + {{Dip}_{2} \cdot w}}},}} & ( {4.5.e} )\end{matrix}$

where

W is the weighting function.

Fuzzy logic is a branch of artificial intelligence that deals withreasoning algorithms used to emulate human thinking and decision makingin machines. These algorithms are used in applications where processdata cannot be represented in binary form. As is known in the art, thethree main actions performed by a fuzzy logic controller are:

(I) Fuzzification

When the fuzzy controller receives the input data (referred to as crispinput), it translates it into a fuzzy form. This process is referred toas fuzzification. During fuzzification, a fuzzy logic controllerreceives input data, also known as the fuzzy variable, and analyzes itaccording to user-defined charts called membership functions.

Membership functions group input data into sets, such as temperaturesthat are too cold, motor speeds that are acceptable, etc. The controllerassigns the input data a grade from 0 to 1 based on how well it fitsinto each membership function. Membership functions can have manyshapes, depending on the data set, but the most common are the S, Z, Δ,and Π shapes. Note that these membership functions are made up ofconnecting line segments defined by the lines' end points.

(II) Fuzzy Processing

In this stage, the controller performs fuzzy processing, which involvesthe evaluation of the input information according to IF . . . THEN rulescreated by the user during the fuzzy control system's programming anddesign stages.

(III) Defuzzification

Once the fuzzy controller finishes the rule-processing stage and arrivesat an outcome conclusion, it begins the defuzzification process. In thisfinal step, the fuzzy controller converts the output conclusions into“real” output data (referred to as crisp output).

The final output value from the fuzzy controller depends on thedefuzzification method used to compute the outcome values correspondingto each label. The defuzzification process examines all of the ruleoutcomes after they have been logically added and then computes a valuethat will be the final output of the fuzzy controller. There are manydefuzzification methods based on mathematical algorithms. For example,the center of gravity method, also referred to as “calculating thecentroid,” mathematically obtains the center of mass of the triggeredoutput membership functions. In mathematical terms, a centroid is thepoint in a geometrical figure whose coordinates equal the average of allthe other points comprising the figure. This point is the center ofgravity of the figure. In one or more embodiments, the crisp output fromthe centroid defuzzifier can be expressed as follows:

$\begin{matrix}{{{OUTPUT} = \frac{\int{{\mu_{c}(x)}x{\mathbb{d}x}}}{\int{{\mu_{c}(x)}{\mathbb{d}x}}}},} & (5.1)\end{matrix}$

In an example of inclination computation using fuzzy logic, there are 3membership function groups, namely 1) low static inclination, 2) mediumstatic inclination, and 3) high static inclination. A static inclinationis used as a crisp input, and an actual inclination is used as a crispoutput. There are 3 inclination computation methods each using acorresponding membership function group.

Low Inclination:Inc₃=arctan 2(G _(xy) ,G _(zz)),  (5.2)

Medium Inclination:Inc₁=arccos(G _(zn)),  (5.3)

High Inclination:Inc₂=arcsin(G _(xyn)),  (5.4)

These three equations are chosen for demonstration purposes only.Different choice of the equations may also be used. Instead of using theweighted average formula described above, in one or more embodiments,these 3 inclination computation results are combined by an expert system(Fuzzy logic) using the example membership functions shown in FIG. 1.6.In such embodiments, the membership function is referred to as theweighting function (211).

Note that in contrast to the aforementioned weighted average formula,the fuzzy logic membership functions have different max and minoverwraps (i.e., the region where the inclination is computed using morethan one inclination method). For example, the max overwrap windows(defined by the end points where membership grade=1) is between 3 and 5,and between 83 and 85. In the equationInc=Inc₁·(1−wInc·wN)+Inc₂·swInc·wN, the combined weight (swInc·wN)determines the ratio between Inc1 and Inc2. In contrast, for the fuzzylogic example, the min overwrap (defined by endpoints where membershipgrade=0) windows between 2 and 6 and 82 and 86. In the example shown inFIG. 1.6, a trapezoidal membership function is used. However, othermembership function shapes, such as, triangular, Gaussian, Poisson,parabola, etc, can also be used in other examples.

Similar to how weighting functions are determined for the weightedaverage formula examples, membership functions may be derived from thefield data analysis or from a simulation model of the system (e.g.,sensor model, vibration/shock model, flow model, etc.). In one or moreembodiments, the weighting function generator (203) is configured todetermine the membership functions as the weighting function (211).

In a modified defuzzification centroid method, results from multipleinclination computation methods (Inc₁, Inc₂, or Inc₃) are used in thedefuzzification process. Three examples based on the example membershipfunctions of FIG. 1.6 are shown below:

Case 1: Inc=2, Inc₁=1.9, Inc₂=2.1 and Inc₃=2.2Crisp OUTPUT=Inc₁=1.9 degrees

Case 2: Inc=3, Inc₁=2.9, Inc₂=3.1 and Inc₃=3.2CrispOUTPUT=((Inc1Area×Inc₁)+(Inc2AreaUnder0.33×Inc₂))/(Inc1Area+Inc2AreaUnder0.33)=(4.5×2.9+27.33×3.1)/(4.5+27.33)=97.773/31.83=3.072degrees

Case 3: Inc=4, Inc₁=3.9, Inc₂=4.1 and Inc₃=4.2CrispOUTPUT=((Inc1AreaUnder0.66×Inc₁)+(Inc2AreaUnder0.66×Inc₂))/(Inc1AreaUnder0.66+Inc2AreaUnder0.66)=(3.3333×3.9+53.46×4.1)/(3.3333+53.46)=232.186/56.7933=4.08826degrees

FIG. 2 depicts an example flowchart of weighting function forinclination and azimuth computation in accordance with one or moreembodiments. For example, the method depicted in FIG. 2 may be practicedusing the attitude calculator (200) described in reference to FIGS. 1.1and 1.2 above. In one or more embodiments, one or more of the elementsshown in FIG. 2 may be omitted, repeated, and/or performed in adifferent order. Accordingly, embodiments of weighting function forinclination and azimuth computation should not be considered limited tothe specific arrangements of elements shown in FIG. 2.

Initially in Block 221, survey data is obtained from a sensor in abottom hole assembly (BHA). In one or more embodiments, the survey dataincludes 3-axis accelerometer data and/or 3-axis magnetometer data. Forexample, the survey data may be obtained using a 3-axis accelerometer ora 3-axis magnetometer located on various sensor mounting platforms, suchas a rotary steerable platform, a roll-stabilized platform, anon-rotating platform, or a slowly-rotating housing of the BHA. In oneor more embodiments, the survey data is used to compute a surveyparameter, such as the inclination, azimuth, magnetic dip, etc. of thedrillstring, BHA, and the drill bit using various formulae.

In Block 222, a weighting function is determined. In one or moreembodiments, the weighting function is a parameterized mathematicalfunction specifying output values using an approximate drillingdirection as input. The output results of the weighting function arereferred to as weighting coefficients or weights. In one or moreembodiments, the approximate drilling direction is based on the surveydata during a static survey.

In one or more embodiments, the weighting function specifies weightingcoefficients in a weighted average equation for combining estimates ofthe survey parameter as computed using the various formulae. Inparticular, the weighting coefficients in the weighted average equationcontrol contributions of the various formulae to the weighted estimate.In one or more embodiments, the weighting function includes membershipfunctions in a fuzzy logic model for combining estimates of the surveyparameter as computed using the various formulae. In particular, themembership functions assign weighting coefficients in the fuzzy logicmodel to control contributions of the various formulae to the weightedestimate. In one or more embodiments, the values specified by theweighting function are dependent on the drilling direction. Inparticular, weighting coefficients are assigned to reduce inaccuracy ofthe weighted estimate resulting from the noise sensitivities associatedwith the various formulae. In one or more embodiments, the noisesensitivities are dependent on the drilling direction. Generally, someformulae are more sensitive to the noise at certain drilling directionthan other formulae, and vice versa.

In the embodiments where the weighting function is a parameterizedmathematical function, the parameters in the parameterized mathematicalfunction may be determined based on a sensor noise model. In particular,the sensor noise model represents the noise induced in the 3-axisaccelerometer data and/or 3-axis magnetometer data as a result of thesensor platform vibration in downhole conditions, such as the drillinginduced vibration/shock. The sensor noise model also models theincreased noise sensitivity of the sensor when drilling near vertical ornear the north/south plane. In one or more embodiments, the parametersin the parameterized mathematical function are further determined basedon a vibration model representing statistical magnitude and spectraldistributions of the sensor platform vibration.

As described in reference to the weighting function generator (203)depicted in FIG. 1.2 above, the weighting function is determined to givethe lowest error on the inclination and azimuth computation with respectto real-life noise inducing mechanisms downhole. The optimum values maybe determined empirically by trial and error or using computer basedtechniques. In one or more embodiments, the weighting function isdetermined using simulated data for a specified level of error sourcessuch as shock and vibration, sensor misalignment, sensor pack rollstabilization error, magnetic interference etc. In one or moreembodiments, the weighting function is determined using a calibrationtechnique to compare ground truth data and the raw data recorded by the3-axis accelerometer and 3-axis magnetometer when drilling downhole.

In Block 223, a first estimate of the survey parameter is calculatedbased on the survey data using a first formula. In addition, a secondestimate of the survey parameter is calculated based on the survey datausing a second formula. For example, the first formula is based at leaston an axial component of the survey data, such as the axial vectorsmethod known in the art. The second formula is additionally based on alateral component of the survey data, such as the 3-axis measurementsmethod known in the art. Generally, the two formulae are associated withdifferent noise sensitivities with respect to the drilling direction.For example, the axial vectors method using axial data becomes lessaccurate when drilling near vertical or drilling in the north-southplane due to gravity/magnetic field induced noise sensitivity of thesensors. The 3-axis measurements method using 3-axis data becomes lessaccurate during drilling due to shock/vibration induced noisesensitivity of the sensors. Therefore the 3-axis measurements method ismore suited to conditions when the drillstring is stationary.

In Block 224, a weighted estimate of the survey parameter is determinedbased on the weighting function from the first estimate and the secondestimate. In one or more embodiments, the weighting function adjusts,using an approximate drilling direction as input, contributions of thefirst estimate and the second estimate to the weighted estimate. Forexample, the drilling direction determined during a most recent staticsurvey may be used as the approximate drilling direction. In anotherexample, the first estimate or the second estimate itself may be used asthe approximate drilling direction.

In particular, the contributions are adjusted to reduce the inaccuracyof the weighted estimate resulting from the noise sensitivities inherentin the formulae used to compute the first estimate and the secondestimate. For example, the weighting function may maximize a weightingof 3-axis measurements method when the drilling is stopped or when thedrilling operation is along near-vertical trajectory or anear-north/south trajectory, such as within 1 deg of vertical ornorth/south direction. In another example, the weighting function maymaximize the weighting of the axial vectors method when occurrences ofabnormal condition are frequent, such as during drilling.

In Block 225, the drilling operation is performed based on the weightedestimate of the survey parameter. For example, the inclination andazimuth computed based on the weighting function are used as feedback ina directional drilling controller to maintain a desired drillingtrajectory.

Based on the method of using weighting function for inclination andazimuth computation described above, the accuracy of the measurement ofthe attitude of the drillstring is improved when the tool is drillingnear vertical or near north-south, provided the rotation rate of thesensor package is sufficiently low. Typical tool configurations are aroll stabilized sensor platform or an MWD tool used with a mud motor insliding mode. Accordingly, the drilling operator can make betterinformed steering command decisions and there is less uncertainty onwell placement. In addition, it will lead to improvements in toolsteering automation algorithms.

An example of weighting function for inclination and azimuth computationis described in FIG. 3 below. In this example, raw data are obtainedfrom a BHA sensor package with the tool drilling a near-vertical well(i.e., the inclination is near 0 deg). The sensor measurements areaveraged and stored in the tool memory every 200 ms. In thepost-processing, the length of time over which the survey was made was90 seconds. Said in other words, each dot in FIG. 3 is calculated usingraw data obtained within a 90 second survey time window or approximately450 data samples (90 second/200 ms)). The parameters used in theweighting functions are shown in TABLE 1 below. In this example, theseparameters are determined based on simulation results using a vibrationmodel and a sensor noise model. In particular, the vibration modelrepresents statistical magnitude and spectral distributions of thesensor platform vibration while the sensor noise model represents thenoise induced in the sensor measurements (e.g., the 3-axis accelerometerdata (212) and/or 3-axis magnetometer data (213) shown in FIG. 1.2) as aresult of the sensor platform vibration. The sensor noise model alsomodels the increased noise sensitivity of the sensor when drilling nearvertical or near the north/south plane.

TABLE 1 Parameter Value Incmin (deg) 1 Incmax (deg) 3 Nmin (%) 45 Nmax(%) 90 Azimin (deg) 20 Azimax (deg) 40

FIG. 3 shows the improvements in the measurement of the inclination andazimuth that can be made using the weighting function method. The dotsshow the attitude calculated using the axial vector method (i.e., Inc₁in (1.5.1a) or Azi₁ in (1.5.2a)). The lines show the attitude calculatedusing the weighting function method (i.e., Inc in (1.5.1a) or Azi in(1.5.2a)).

As can be seen in the plot of the inclination on the left side of FIG.3, the precision of the inclination is improved by an order of magnituderange from 0 to 1.4. As can be seen in the plot of the azimuth on theright side of FIG. 3, using the axial vector method, the azimuth(represented by dots) is locked at either −90 deg or +90 deg. With theweighting function method (represented by the line), the azimuth showsthe tool spiraling within the range of −160 deg to +160 deg.

Embodiments of weighting function for inclination and azimuthcomputation may be implemented on virtually any type of computerregardless of the platform being used. For instance, as shown in FIG. 4,a computer system (400) includes one or more processor(s) (402) such asa central processing unit (CPU) or other hardware processor, associatedmemory (405) (e.g., random access memory (RAM), cache memory, flashmemory, etc.), a storage device (406) (e.g., a hard disk, an opticaldrive such as a compact disk drive or digital video disk (DVD) drive, aflash memory stick, etc.), and numerous other elements andfunctionalities typical of today's computers (not shown). The computer(400) may also include input means, such as a keyboard (408), a mouse(410), or a microphone (not shown). Further, the computer (400) mayinclude output means, such as a monitor (412) (e.g., a liquid crystaldisplay LCD, a plasma display, or cathode ray tube (CRT) monitor). Thecomputer system (400) may be connected to a network (415) (e.g., a localarea network (LAN), a wide area network (WAN) such as the Internet, orany other similar type of network) via a network interface connection(not shown). Those skilled in the art will appreciate that manydifferent types of computer systems exist (e.g., workstation, desktopcomputer, a laptop computer, a personal media device, a mobile device,such as a cell phone or personal digital assistant, or any othercomputing system capable of executing computer readable instructions),and the aforementioned input and output means may take other forms, nowknown or later developed. Generally speaking, the computer system (400)includes at least the minimal processing, input, and/or output meansnecessary to practice one or more embodiments.

Further, those skilled in the art will appreciate that one or moreelements of the aforementioned computer system (400) may be located at aremote location and connected to the other elements over a network.Further, one or more embodiments may be implemented on a distributedsystem having a plurality of nodes, where each portion of theimplementation may be located on a different node within the distributedsystem. In one or more embodiments, the node corresponds to a computersystem. Alternatively, the node may correspond to a processor withassociated physical memory. The node may alternatively correspond to aprocessor with shared memory and/or resources. Further, softwareinstructions to perform one or more embodiments may be stored on acomputer readable medium such as a compact disc (CD), a diskette, atape, or any other computer readable storage device.

While weighting function for inclination and azimuth computation hasbeen described with respect to a limited number of embodiments, thoseskilled in the art, having benefit of this disclosure, will appreciatethat other embodiments may be devised which do not depart from the scopeof weighting function for inclination and azimuth computation asdisclosed herein. Accordingly, the scope of weighting function forinclination and azimuth computation should be limited only by theattached claims.

What is claimed is:
 1. A method to perform a drilling operation in asubterranean formation, comprising: obtaining, during the drillingoperation associated with a drilling direction, survey data from asensor in a bottom hole assembly (BHA); calculating, by a hardwareprocessor based on the survey data, a first estimate of a surveyparameter using a first formula associated with a first noisesensitivity; calculating, by the hardware processor based on the surveydata, a second estimate of the survey parameter using a second formulaassociated with a second noise sensitivity; assigning, based on aweighting function and the drilling direction, a plurality of weightingcoefficients to the first estimate and the second estimate; andgenerating, by the hardware processor, a weighted estimate of the surveyparameter based on the plurality of weighting coefficients, the firstestimate, and the second estimate, wherein the plurality of weightingcoefficients control contributions of the first estimate and the secondestimate to the weighted estimate, wherein the plurality of weightingcoefficients are assigned to reduce inaccuracy of the weighted estimateresulting from the first noise sensitivity and the second noisesensitivity, and wherein the first noise sensitivity and the secondnoise sensitivity are dependent on the drilling direction; andperforming the drilling operation based on the weighted estimate of thesurvey parameter.
 2. The method of claim 1, wherein the weightingfunction maximizes a weighting coefficient assigned to the firstestimate when the drilling direction is along at least one selected froma group consisting of a near-vertical trajectory and a near-north/southtrajectory.
 3. The method of claim 1, further comprising: obtaining asimulation result of the sensor based on a sensor noise model, whereinthe sensor noise model represents sensor noises induced by vibration ofthe BHA during the drilling operation; and determining the weightingfunction based on the simulation result.
 4. The method of claim 1,wherein the first formula is based on an axial component of the surveydata, and wherein the second formula is based on a lateral component ofthe survey data.
 5. The method of claim 1, wherein the weightingfunction comprises membership functions for the first estimate and thesecond estimate in a fuzzy logic model.
 6. The method of claim 1,wherein the survey data comprises at least one selected from a groupconsisting of 3-axis accelerometer data and 3-axis magnetometer data. 7.The method of claim 1, wherein the survey parameter comprises at leastone selected from a group consisting of inclination, azimuth, andmagnetic dip.
 8. A system for estimating a survey parameter for adrilling operation in a subterranean formation, comprising: a repositoryconfigured to store survey data and a weighting function; a hardwareprocessor; and a data analyzer executing on the hardware processor andconfigured to: obtain, during the drilling operation associated with adrilling direction, survey data from a sensor in a bottom hole assembly(BHA); calculate, based on the survey data, a first estimate of thesurvey parameter using a first formula associated with a first noisesensitivity; calculate, based on the survey data, a second estimate ofthe survey parameter using a second formula associated with a secondnoise sensitivity; assign, based on a weighting function and thedrilling direction, a plurality of weighting coefficients to the firstestimate and the second estimate; and generate a weighted estimate ofthe survey parameter based on the plurality of weighting coefficients,the first estimate, and the second estimate, wherein the plurality ofweighting coefficients control contributions of the first estimate andthe second estimate to the weighted estimate, wherein the plurality ofweighting coefficients are assigned to reduce inaccuracy of the weightedestimate resulting from the first noise sensitivity and the second noisesensitivity, and wherein the first noise sensitivity and the secondnoise sensitivity are dependent on the drilling direction; and whereinthe drilling operation is performed based on the weighted estimate ofthe survey parameter.
 9. The system of claim 8, wherein the weightingfunction maximizes a weighting coefficient assigned to the firstestimate when the drilling direction is along at least one selected froma group consisting of a near-vertical trajectory and a near-north/southtrajectory.
 10. The system of claim 8, further comprising a weightingfunction generator configured to: obtain a simulation result of thesensor based on a sensor noise model, wherein the sensor noise modelrepresents sensor noises induced by vibration of the BHA during thedrilling operation; and determine the weighting function based on thesimulation result.
 11. The system of claim 8, wherein the first formulais based at least on an axial component of the survey data, and whereinthe second formula is based at least on a lateral component of thesurvey data.
 12. The system of claim 8, wherein the weighting functioncomprises membership functions for the first estimate and the secondestimate in a fuzzy logic model.
 13. The system of claim 8, wherein thesurvey data comprises at least one selected from a group consisting of3-axis accelerometer data and 3-axis magnetometer data.
 14. The systemof claim 8, wherein the survey parameter comprises at least one selectedfrom a group consisting of inclination, azimuth, and magnetic dip.
 15. Anon-transitory computer readable medium storing instructions forestimating a survey parameter for a drilling operation in a subterraneanformation, the instructions when executed causing a processor to:obtain, during the drilling operation associated with a drillingdirection, survey data from a sensor in a bottom hole assembly (BHA);calculate, based on the survey data, a first estimate of the surveyparameter using a first formula associated with a first noisesensitivity; calculate, based on the survey data, a second estimate ofthe survey parameter using a second formula associated with a secondnoise sensitivity; assign, based on a weighting function and thedrilling direction, a plurality of weighting coefficients to the firstestimate and the second estimate; and generate a weighted estimate ofthe survey parameter based on the plurality of weighting coefficients,the first estimate, and the second estimate, wherein the plurality ofweighting coefficients control contributions of the first estimate andthe second estimate to the weighted estimate, wherein the plurality ofweighting coefficients are assigned to reduce inaccuracy of the weightedestimate resulting from the first noise sensitivity and the second noisesensitivity, and wherein the first noise sensitivity and the secondnoise sensitivity are dependent on the drilling direction.
 16. Thenon-transitory computer readable medium of claim 15, the instructionswhen executed further causing a processor to: obtain a simulation resultof the sensor based on a sensor noise model, wherein the sensor noisemodel represents sensor noises induced by vibration of the BHA duringthe drilling operation; and determine the weighting function based onthe simulation result.
 17. The non-transitory computer readable mediumof claim 15, wherein the first formula is based at least on an axialcomponent of the survey data, and wherein the second formula is based atleast on a lateral component of the survey data.
 18. The non-transitorycomputer readable medium of claim 15, wherein the weighting functioncomprises weighting coefficients for the first estimate and the secondestimate in a weighted average equation.
 19. The non-transitory computerreadable medium of claim 15, wherein the weighting function comprisesmembership functions for the first estimate and the second estimate in afuzzy logic model.
 20. The non-transitory computer readable medium ofclaim 15, wherein the survey data comprises at least one selected from agroup consisting of 3-axis accelerometer data and 3-axis magnetometerdata, and wherein the survey parameter comprises at least one selectedfrom a group consisting of inclination, azimuth, and magnetic dip.